package com.huawei.appmarket.service.launcher;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.huawei.fastengine.fastview.Config;
import com.huawei.fastengine.fastview.FastSDKEngine;
import o.ceg;
import o.Logger;
import o.ContentManager;

public class FastAppInterceptor implements ceg {
    public boolean isInterceptor(String str) {
        return Config.FASTAPP_PACKAGE_NAME.equals(str);
    }

    public Intent getIntentByPackage(Context context, String str) {
        if (Logger.ˎ()) {
            Logger.ˏ("AppLauncher", "launchDefaultIntent for launching package:[" + str + "]");
        }
        return new Intent();
    }

    public boolean launchByPackage(Context context, Intent intent, String str, String str2) {
        return ˊ(context, "recommend");
    }

    public void interceptorResult(String str, Context context) {
    }

    public int getLaunchResult() {
        return 0;
    }

    public void setLaunchResult(int i) {
    }

    public boolean launchManagerTab(Context context) {
        return ˊ(context, "manager");
    }

    private boolean ˊ(Context context, String str) {
        Logger.ˎ("AppLauncher", "Open fast app Engine's" + str);
        Bundle bundle = new Bundle();
        bundle.putCharSequence("channel", ContentManager.getInstant().getContext().getPackageName());
        bundle.putCharSequence("target", str);
        FastSDKEngine.launchFastAppCenterFromAppGallery(context, bundle);
        return true;
    }
}
